package com.example.demo.repository;

import org.springframework.data.mongodb.repository.DeleteQuery;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.example.demo.model.AccessToken;

public interface AccessTokenRepository extends MongoRepository<AccessToken, String> {
	
	@DeleteQuery(value = "{'username':?0}")
	public void deleteByUsername(String username);

	public AccessToken findByAccessToken(String accessToken);
	
	@DeleteQuery(value = "{'access_token':?0}")
	public void deleteByAccessToken(String accessToken);
}
